/*********************************************************************************************
 *
 *		Function  To	validate number     												 *
 *
 ********************************************************************************************/
#include "mystrings.h"

int do_valid_no (char *line){						/* line - buffer to read input */

l1:													/* goto label from loop untill success */
	if ((fgets (line, MAXLINE, stdin )) == NULL)
		exit (1);
	line[mystrlen(line)-1] ='\0' ;								/* replace new line by NULL*/
	//	printf (" line = %s \n",line);

	if ( valid_no(line)  ==0){
		printf ("enter thr number: ");
		goto l1;
	}
	else
		return myatoi (line);

}

